package com.xm.springboot_spi_service;

import com.xm.springboot_spi.IPayService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * Author：xm
 * Project：interview
 * Date：2025/9/3  11:09
 */

@RestController
public class MyController {

    @Autowired
    private IPayService payService;

    @GetMapping("/hello")
    public void test() {
        payService.pay();
    }

    // 测试 skywalking自定义插件拦截的类和方法为 MyService.service()
    @GetMapping("/plugin-develop")
    public String pluginDev() {
        String str = "有参有返回值";
        Integer i = 333;
        return new MyService().service(str, i);
    }

    @GetMapping("/plugin-develop2")
    public void pluginDev2() {
        new MyService().serviceA();
    }
}
